﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 商场收银系统v2._0简单工厂
{
    public class CashFactory
    {
        public static CashSuper Create(string type)
        {
            switch (type)
            {
                case "正常收费":
                    return new CashNormal();

                case "打8折":
                    return new CashRebate(0.8);

                case "满300返100":
                    return new CashReturn(300, 100);
            }
            return new CashNormal();
        }
    }
}
